package com.qing.common.utils;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * @author guoqf
 */
public class RegexUtil {
    public static void main(String[] args) {
        int sameCount=5;
        String pattern = "(\\D)\\1{" + (sameCount - 1) + "}";
        System.out.println(pattern);
        String s = " 111 11aaaac";
        Pattern compile = Pattern.compile(pattern);
        Matcher matcher = compile.matcher(s);
        boolean matches = matcher.find();
        System.out.println("matches: " + matches);

    }
}
